<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head th:include="common_include :: commonHead('用户编辑')"/>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <form class="form-horizontal m" id="form-user-edit" th:object="${user}">
                <input type="hidden" name="rowKey" id="rowKey" th:field="*{rowKey}"/>
                <input type="hidden" name="serverKey" id="serverKey" th:field="*{serverKey}"/>
                <div class="form-group">
                    <label class="col-sm-3 control-label">用户名称：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="username" id="username" readonly="true" th:field="*{username}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">用户密码：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="password" name="password" id="password">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label ">员工名称：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="staffName" id="staffName" th:field="*{staffName}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label ">员工工号：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="staffNum" id="staffNum" th:field="*{staffNum}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label ">员工邮箱：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="email" name="staffEmail" id="staffEmail" th:field="*{staffEmail}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label ">登录账号：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="loginAccount" id="loginAccount" th:field="*{loginAccount}"/>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="common_include :: commonFoot"/>
<script type="text/javascript">
    var prefix = ctx + "service/svnkit/users"

    $("#form-user-edit").validate({
        submitHandler: function (form) {
            $.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
        }
    });

    function submitClick() {
        if ($('#form-user-edit').valid()) {
            $('#form-user-edit').submit()
        }
    }
</script>
</body>
</html>
